import Vue from 'vue'
import Router from 'vue-router'
import index from'@/views/index'
import HomeView from '@/views/HomeView'
import DrivingLicense from '@/views/DrivingLicense'
import CarList from '@/views/CarList'
import CarUser from '@/views/CarUser'
import CarProgram from '@/views/CarProgram'
import CarBaojia from '@/views/CarBaojia'
import listAddress from '@/views/listAddress'
import choiceSecure from '@/views/choiceSecure'
import orderList from '@/views/orderList'
import userCenter from '@/views/userCenter'
import underWriteSus from'@/views/underWriteSus'
import updateVideo from'@/views/updateVideo'




Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/HomeView'
    },

    {
      path: '/index',
      name: 'index',
      component: index,
      children: [  //这里就是二级路由的配置
        {
          path: '/HomeView',
          // redirect: '/HomeView',
          name: 'HomeView',
          component: HomeView,
          meta: {
            title:'车辆信息',
            keepAlive: false ,// 不需要缓存
            disabled:false,
            tabbar:true,
            gohome:true,
            t_active:0
          }
        },
        {
          path: '/DrivingLicense',
          name: 'DrivingLicense',
          component: DrivingLicense,
          meta: {
            title:'行驶证信息',
            keepAlive: false ,// 不需要缓存
            disabled:true,
            tabbar:false
          }
        },
        {
          path: '/CarList',
          name: 'CarList',
          component: CarList,
          meta: {
            title:'车型列表',
            keepAlive: false ,// 不需要缓存
            disabled:true,
            tabbar:false
          }
        },
        {
          path: '/CarUser',
          name: 'CarUser',
          component: CarUser,
          meta: {
            title:'车主信息',
            keepAlive: false ,// 不需要缓存
            disabled:true,
            tabbar:false
          }
        },
        {
          path: '/CarProgram',
          name: 'CarProgram',
          component: CarProgram,
          meta: {
            title:'投保方案',
            keepAlive: false ,// 不需要缓存
            disabled:true,
            tabbar:false
          }
        },
        {
          path: '/choiceSecure',
          name: 'choiceSecure',
          component: choiceSecure,
          meta: {
            title:'详细报价',
            keepAlive: false ,// 不需要缓存
            disabled:true,
            tabbar:false
          }
        },
        {
          path: '/CarBaojia',
          name: 'CarBaojia',
          component: CarBaojia,
          meta: {
            title:'报价详情',
            keepAlive: false ,// 不需要缓存
            disabled:true,
            tabbar:false
          }
        },
    
        {
          path: '/listAddress',
          name: 'listAddress',
          component: listAddress,
          meta: {
            title:'配送地址',
            keepAlive: false ,// 不需要缓存
            disabled:true,
            tabbar:false
          }
        },
        {
          path: '/updateVideo',
          name: 'updateVideo',
          component: updateVideo,
          meta: {
            title:'上传影像',
            keepAlive: false ,// 不需要缓存
            disabled:true,
            tabbar:false
          }
        },
        {
          path: '/underWriteSus',
          name: 'underWriteSus',
          component: underWriteSus,
          meta: {
            title:'投保成功',
            keepAlive: false ,// 不需要缓存
            disabled:false,
            tabbar:false
          }
        },
        
       
      ]
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      children: [  //这里就是二级路由的配置
        {
          path: '/orderList',
          // redirect: '/HomeView',
          name: 'orderList',
          component: orderList,
          meta: {
            title:'订单列表',
            keepAlive: false ,// 不需要缓存
            disabled:false,
            tabbar:true,
            gohome:true,
            t_active:1
          }
        }
      ]
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      children: [  //这里就是二级路由的配置
        {
          path: '/userCenter',
          // redirect: '/HomeView',
          name: 'userCenter',
          component: userCenter,
          meta: {
            title:'个人中心',
            keepAlive: false ,// 不需要缓存
            disabled:false,
            tabbar:true,
            gohome:true,
            t_active:2
          }
        }
      ]
    },
    
    // {
    //   path: '/',
    //   component: HomeView,
    //   redirect: '/HomeView',
    //   name: 'HomeView',
    //   children: [{
    //     path: '行驶证信息',
    //     component: () =>
    //       import('@/views/HomeView'),
    //     meta: {
    //       title: '车辆信息',
    //       icon: ''
    //     },
    //   }, ]
    // },
  ]
})
